const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('sunnyTopMenuSetting', {
    id: {
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true,
      comment: "主键"
    },
    topMenuId: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "顶部菜单主键",
      field: 'top_menu_id'
    },
    menuId: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "菜单主键",
      field: 'menu_id'
    }
  }, {
    sequelize,
    tableName: 'sunny_top_menu_setting',
    timestamps: true,
    createdAt: 'createTime',
    updatedAt: 'updateTime',
    deletedAt: 'deleteTime',
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
